package com.test.service;

import com.test.entity.ImgInfo;
import com.test.mapper.ImgInfoDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author welcome
 */
@Service
public class ImgInfoService {
    @Resource
    ImgInfoDao dao;

    public ImgInfo selectById(Integer imgId){
        ImgInfo imgInfo = dao.selectById(imgId);
        if (imgInfo!=null){
            return imgInfo;
        }
        return null;
    }

    public Integer insert(ImgInfo imgInfo){
        int insert = dao.insert(imgInfo);
        return insert;
    }

    public Integer deleteById(Integer imgId){
        int i = dao.deleteById(imgId);
        return i;
    }
}
